//
//  JipanCell.m
//  Travel
//
//  Created by lanou3g on 15/4/11.
//  Copyright (c) 2015年 &#21556;&#21697;&#27901;. All rights reserved.
//

#import "JipanCell.h"

@implementation JipanCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)prepareForReuse
{
    self.buttonZhuanti = [[UIButton alloc] init];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.labelName = [[UILabel alloc] init];
        self.labelEngame = [[UILabel alloc] init];
        self.imageViewPhoto = [[UIImageView alloc] init];
        self.buttonZhuanti = [[UIButton alloc] init];
        self.buttonWalk = [[UIButton alloc] init];
        self.buttonyouji = [[UIButton alloc] init];
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.imageViewPhoto.frame = CGRectMake(self.contentView.frame.size.width / 37.5, self.contentView.frame.size.height / 27,self.contentView.frame.size.width - 20, self.contentView.frame.size.height - self.contentView.frame.size.height / 3.85 - self.contentView.frame.size.height / 27);
    [self.contentView addSubview:self.imageViewPhoto];
    self.labelName.frame = CGRectMake(self.imageViewPhoto.frame.size.width / 35.5, self.imageViewPhoto.frame.size.height / 19, self.imageViewPhoto.frame.size.width / 2, self.imageViewPhoto.frame.size.height / 9.5);
     self.labelName.textColor = [UIColor whiteColor];
    [self.imageViewPhoto addSubview:self.labelName];
    self.labelEngame.frame = CGRectMake(self.imageViewPhoto.frame.size.width / 35.5, self.imageViewPhoto.frame.size.height / 19 + self.imageViewPhoto.frame.size.height / 9.5 + self.imageViewPhoto.frame.size.height / 95, self.imageViewPhoto.frame.size.width / 2, self.imageViewPhoto.frame.size.height / 9.5);
    self.labelEngame.textColor = [UIColor whiteColor];
    [self.imageViewPhoto addSubview:self.labelEngame];
    self.buttonZhuanti.frame = CGRectMake(self.contentView.frame.size.width / 12.5, self.contentView.frame.size.height / 1.28 , self.contentView.frame.size.width / 9.375, self.contentView.frame.size.height / 5.4);
    self.buttonZhuanti.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.buttonZhuanti];
    self.buttonWalk.frame = CGRectMake(self.contentView.frame.size.width / 2.3, self.contentView.frame.size.height / 1.28, self.contentView.frame.size.width / 9.375, self.contentView.frame.size.height / 5.4);
    self.buttonWalk.backgroundColor = [UIColor cyanColor];
    [self.contentView addSubview:self.buttonWalk];
    self.buttonyouji.frame = CGRectMake(self.contentView.frame.size.width / 1.229,self.contentView.frame.size.height / 1.28, self.contentView.frame.size.width / 9.375, self.contentView.frame.size.height / 5.4);
    self.buttonyouji.backgroundColor = [UIColor orangeColor];
    [self.contentView addSubview:self.buttonyouji];
    
    
}
@end
